<?php
namespace app\admin\validate;

use think\Validate;

/**
 * 预约项目分类
 * Class ProjectClassify
 * @package app\admin\validate
 */
class ProjectClassify extends Validate
{
    protected $rule = [
        'pid'   => 'require',
        'title' => 'require|unique:project_classify',
        'sort'  => 'number'
    ];

    protected $message = [
        'pid.require'   => '请选择上级分类',
        'title.require' => '请输入分类名称',
        'title.unique'  => '分类名称已存在',
        'sort.number'   => '排序只能填写数字'
    ];
}